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

Read remote URLs (http://...) as files for: infile, include, includeconf, CSS, CSV, template #84

Closed
GoogleCodeExporter opened this Issue Apr 18, 2015 · 5 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Apr 18, 2015

Today Internet files are just as accesible as local files.
Txt2tags must come to the new century :)

Make this a reality:

txt2tags -t html -i http://txt2tags.org/index.t2t -o index.html

txt2tags --config-file http://txt2tags.org/test/includeconf.t2t -i file.t2t

txt2tags  --css-inside --style http://txt2tags.org/test/file.css -i file.t2t

txt2tags -t html --template http://txt2tags.org/templates/foo.html -i file.t2t


Also, make this settings and commands a reality:

%!includeconf: http://txt2tags.org/test/includeconf.t2t
%!style: http://txt2tags.org/test/file.css

%!include: http://txt2tags.org/test/include-t2t.t2t
%!include: ""http://txt2tags.org/test/include-raw.t2t""
%!include: ''http://txt2tags.org/test/include-tagged.t2t''
%!include: ``http://txt2tags.org/test/include-verb.t2t``
%!csv: http://txt2tags.org/test/file.csv

This is just a first step to open really great new possibilities for the 
program. We can create an online user repository for: configs, templates, 
styles and other users can use it directly without downloading/installing 
anything.

I'm working on this feature right now.

Original issue reported on code.google.com by aureliojargas@gmail.com on 22 Nov 2010 at 6:57

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 18, 2015

Initial working commit in r525, with the help of previous commits related to 
path handling (r517, r519).

These are all OK:
txt2tags --config-file http://txt2tags.org/test/includeconf.t2t -i file.t2t
txt2tags --css-inside --style http://txt2tags.org/test/file.css -i file.t2t
%!includeconf: http://txt2tags.org/test/includeconf.t2t
%!style: http://txt2tags.org/test/file.css
%!include: http://txt2tags.org/test/include-t2t.t2t
%!include: ""http://txt2tags.org/test/include-raw.t2t""
%!include: ''http://txt2tags.org/test/include-tagged.t2t''
%!include: ``http://txt2tags.org/test/include-verb.t2t``
%!csv: http://txt2tags.org/test/file.csv

This is raising error because %%mtime, fix needed:
txt2tags -t html -i http://txt2tags.org/index.t2t -o index.html

This is not working because template loading is doing checks before calling 
Readfile. Fix needed:
txt2tags -t html --template http://txt2tags.org/test/template.html file.t2t

See also the new trunk/test/http folder.

Original comment by aureliojargas@gmail.com on 23 Nov 2010 at 11:45

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 18, 2015

Remote templates are now working (r526).

OK: txt2tags -t html --template http://txt2tags.org/test/template.html file.t2t

Original comment by aureliojargas@gmail.com on 23 Nov 2010 at 12:26

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 18, 2015

%%mtime for remote files is now working (r530).

$ txt2tags -i http://txt2tags.org/index.t2t -o /tmp/index.html
txt2tags wrote /tmp/index.html

\o/

Now that everything is working fine, we just need more extensive tests to close 
this issue.

Original comment by aureliojargas@gmail.com on 23 Nov 2010 at 4:39

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 18, 2015

Missing remote files (404) are now detected (r531).

$ txt2tags http://txt2tags.org/UFO 
txt2tags: Error: Cannot read file: http://txt2tags.org/UFO

Original comment by aureliojargas@gmail.com on 23 Nov 2010 at 5:25

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Apr 18, 2015

This issue was closed by revision r533.

Original comment by aureliojargas@gmail.com on 23 Nov 2010 at 6:31

  • Changed state: Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment