Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform: sed (aka replace) #77

Open
andylolz opened this issue Nov 14, 2013 · 8 comments
Open

Transform: sed (aka replace) #77

andylolz opened this issue Nov 14, 2013 · 8 comments

Comments

@andylolz
Copy link
Collaborator

Well… we could at least partially implement this.

@rufuspollock
Copy link
Member

Basic find and replace would be really useful. Would not go for full sed :-)

@rufuspollock
Copy link
Member

@andylolz i'm trying to use find and replace and keep getting errors

When I try clicking on the example on the page i get an error

http://datapipes.okfnlabs.org/replace/

Here's my link

http://datapipes.okfnlabs.org/csv/replace%20,%20$r/html?r=&url=http://www.cps.gov.uk/data/case_outcomes/february_2012/principal_offence_cat_nat_sum_february_2012.csv

Also how do i replace with nothing - surely second argument should be optional (= empty string).

andylolz added a commit that referenced this issue Nov 25, 2013
Defaults to empty string. Refs #77.
@andylolz
Copy link
Collaborator Author

Also how do i replace with nothing - surely second argument should be optional (= empty string).

V good point! That seems like exactly the solution to the problem you’re having here.

@rufuspollock
Copy link
Member

@andylolz just realized that part of this was that first error had blow the whole system so ignore issue with example - and cf #97

@rufuspollock
Copy link
Member

Got this working - no real bug but some usability plus #97.

Another example for the examples file:

http://datapipes.okfnlabs.org/csv/replace%20-c3%20,%20%24r/html?r=&url=http://www.cps.gov.uk/data/case_outcomes/february_2012/principal_offence_cat_nat_sum_february_2012.csv

This removes the comma in the 4th column numbers. Note we really need to fix #97.

@andylolz
Copy link
Collaborator Author

Usability issue should now be fixed (b3bcdad). So based on your earlier suggestion, your example becomes:

http://datapipes.okfnlabs.org/csv/replace%20-c3%20,/html?url=http://www.cps.gov.uk/data/case_outcomes/february_2012/principal_offence_cat_nat_sum_february_2012.csv

Agree that #97 is pressing. I’ve bumped up the priority. UPDATE: #97 should be fixed now.

andylolz added a commit that referenced this issue Nov 29, 2013
@rufuspollock
Copy link
Member

@andylolz do we mark this as fixed given we have basic replace?

@andylolz
Copy link
Collaborator Author

andylolz commented Dec 1, 2013

Sounds good – although we still need some unit tests for this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants