foxreplace
foxreplace copied to clipboard
ability to bulk add or import substitution list (e.g. via comma separated values)
What steps will reproduce the problem?
1. fox replace options
2. add
3. substitutions tab
What is the expected output? What do you see instead?
- right now each "find" and "replace" item has to be inputted individually...
which is very time consuming because each time i replace, i have to manually
type in 30-50 sets of "find" and "replace" items
- instead, we can we import a csv file or just copy and paste into a text box
with 2 columns, this will be SUPER HELPFUL
- having A CHOICE of separator would be AMAZING (i.e. separated by comma, or
tab, or carrot(^) or anything else)
- e.g. 2 columns inputted to text box (seperated by comma)
i,we
they,them
01,2093
0.21,0.26
0.61,0.66
0.31,0.36
0.76,0.81
0.06,0.11
0.36,0.41
0.26,0.31
0.41,0.46
0.51,0.56
1.01,1.06
0.11,0.16
0.66,0.71
0.56,0.61
What version of the product are you using? On what operating system?
- version 0.13.3
- firefox 15.0.1
- mac os x 10.6.8
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 2 Nov 2012 at 6:18
sorry... this should be enhancement... don't know how to change it back
Original comment by [email protected]
on 2 Nov 2012 at 6:20
Hi, currently you can import and export substitution lists from the main
options window. Isn't this sufficient? Why?
As I have understood your suggestion, it looks like duplicated functionality,
but maybe I haven't fully understood the issue.
Original comment by [email protected]
on 2 Nov 2012 at 2:03
- Added labels: Priority-Low, Type-Enhancement
- Removed labels: Priority-Critical, Type-Defect
hello!
yes there is an import feature... but the file format is either .json or . xml
(which i have no idea how to use)
i went through the docuumentation -> chrome://foxreplace/content/help.xhtml
and didn't find how to use the import and assumed the requested feature didn't
exist...
is it possible that you explain how to format a file for import?
i am thinking a csv file would be easiest for the average user?
THANK YOU!
Original comment by [email protected]
on 2 Nov 2012 at 5:54
You can find general documentation on JSON here:
https://developer.mozilla.org/en-US/docs/JSON . But to see the structure of the
JSON format used in FoxReplace you have the define a few substitutions, export,
and then take a look at the resulting file.
Maybe a CSV-based format would be easier for average users, but the problem I
see with it is that it is too simple to represent the complexity of the data I
need to store. See that it's not only input and output values, but also
substitution settings (input type, match case), a list of URLs and a list of
substitutions for each group, group settings (HTML), and a list of groups.
Maybe this could be represented in CSV in some manner, but in the long run it
is unmantainable.
Original comment by [email protected]
on 3 Nov 2012 at 2:13
csv or Tab deli formats would be useful for us average users who are comfortable in creating conversion table in excel itself.
csv will give rise to issues of field separator (comma ,), but in tab deli that problem is also addressed as there is no explicit character used as a separator nor double-quotes are used for enclosing text fields. in tab deli files, tab separates the fields, and there is no enclosing of text fields, which is convenient.
But then, problem might come to those who are using tab character in source or replacement fields.
Anyway, I am sure if you set out to think about it, you would come up with a very convenient solution for every problem described here.
Thanks
Rawat
Separators or quotes are not an issue. The limitation is that FoxReplace uses structured data that maps directly to JSON, but can't be cleanly mapped to a table, which is the use case for a csv. That means that if a csv import feature is implemented it will be very simple, like a single group with no name, no urls, no html, only substitutions and their parameters.
This post is unrelated to the solution of this issue, but it might help users in generating .json file from csv/ excel file.
I am creating replacement table in excel itself, and using a formula in excel file to generate the fr .json format.
then I take the values in last column having .json format, and paste in to a .json text file, in which I have already put header and footer of fr .json files.
That file I directly import to fr in ff, and it is working well for me.
If anyone else wishes to use it, the excel file is attached at above link, and brief description of fields are col col col col col col col A B C D E F G
2 input 5 output w f 2 r f 2 w t 2 r t 1
Col "A" has a value 1: ignore this line, 2: include this line (just in case you have some other date that you don't want to reach .json file, say, in font conversion, you have entire ascii range 0-255, but you want to ignore control chars 0-31 which are not changed in any font) Col "A"
col B has input string
col C has length of input string (used for sorting the input string so that longer strings are replaced first, so that they don't mess up any part of that loner string coming later on)
col D has replacement string
col E has inputType w: Whole word replacement, r: regex-wise replacement
col F has casesensitive, t (true): casesensitive is true, f (false): casesensitive is false
col G has the formula to generate .json file format.
Any queries about this are welcome.
Thanks.
Rawat
That means that if a csv import feature is implemented it will be very simple, like a single group with no name, no urls, no html, only substitutions and their parameters.
Yes, that is what we want. Only 4 columns
- input string,
- replacement string,
- flag for wholeword/ regex
- flag for casesensitive.
We understand that .json file header wouldn't come.
I am not able to foresee what problems you have foreseen about "no name, no urls, no html"
I mean if someone puts name/ url/ html in input or replacement string, that can be read from csv file to go to input/ replacement and can be processed as such in doing the actual replacement.
If any other issue is there, please give us some insight.
thanks.
Rawat
sorry for all these boldening and larger font size. I don't know what formatting this site uses. Please ignore that all and read as plain text. There is no hidden meaning in boldening and larger font.
I have edited the formatting of one of the comments to make it easier to read.
You understood it right. When I sed "no name, no urls, no html" I was referring to the other data that a group has, in addition to the substitutions. If only the 4 things you mentioned are enough, then it's ok.