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

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

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Copy link
Author

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
Copy link
Author

%%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
Copy link
Author

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
Copy link
Author

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
Projects
None yet
Development

No branches or pull requests

1 participant