Closed tjt263 closed 7 years ago
Hi,
have you tried cd into the directory asciicast2gif and running from there? E.g.:
$ cd /tmp $ git clone https://github.com/pettarin/asciicast2gif.git $ cd asciicast2gif $ ./asciicast2gif demo.json $ # file demo.json.gif has been created
I might have been sloppy in terms of supporting running the script from any directory --- I always use it cd-ing into the project root directory.
HTH,
AP
On 04/01/2017 05:36 PM, tjt263 wrote:
Hi, i tried: `~/asciicast2gif/asciicast2gif ~/example.json ~/example.gif``. It just seems to, either:
- Copy |~/asciicast2gif/gifs/demo.gif| to |~/example.gif|; or
- Parse |~/asciicast2gif/gifs/demo.json|, instead of |~/example.json|. (or |~/asciicast2gif/demo.json|).
Not sure what i did wrong here.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pettarin/asciicast2gif/issues/2, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5Zk69GcCrAw1qALvYvbE2VLLdelVZJks5rrm79gaJpZM4MwhcO.
@pettarin
Ah, I just noticed that you mentioned it in the readme file.
After reading about that; I thought that would fix it, but same thing.
The problem with that example that you gave, is that it's performing the operation on ./demo.json
regardless of the input specified.
For instance:
cd ./asciicast2gif/ #current working directory
cp ../example.json ./ #copy to current directory
rm demo.json #remove(for demonstration)
./asciicast2gif example.json example.gif #specify JSON in & GIF out
[INFO] Starting Python 2 SimpleHTTPServer on port 8000
[INFO] Temporary directory is /tmp/asciicast2gif.8HfD2UnI
[ERRO] Error transferring http://localhost:8000/demo.json -server replied: File not found
[INFO] error fetching asciicast file:
[INFO] ({:status 404, :status-text "File not found", :failure :error, :response
"<head>\n<title>Error response</title>\n</head>\n<body>\n<h1>Error response</h1>
<p>Error code 404.\n<p>Message: File not found.\n<p>Error code explanation: 404
= Nothing matches the given URI.\n</body>\n"})
Hi,
sorry, but I cannot replicate the issue. On my machine:
$ cd /tmp $ git clone https://github.com/pettarin/asciicast2gif.git $ cd asciicast2gif $ mv demo.js foo.js $ ./asciicast2gif foo.js [INFO] Starting Python 2 SimpleHTTPServer on port 8000 [INFO] Temporary directory is /tmp/asciicast2gif.lEMXH8It [INFO] Progress: 7% [INFO] Progress: 14% [INFO] Progress: 21% [INFO] Progress: 30% [INFO] Progress: 37% [INFO] Progress: 44% [INFO] Progress: 53% [INFO] Progress: 60% [INFO] Progress: 67% [INFO] Progress: 76% [INFO] Progress: 83% [INFO] Progress: 90% [INFO] Progress: 100% [INFO] Capture completed [INFO] Terminating simple HTTP server [INFO] Generating GIF... [INFO] Created /tmp/asciicast2gif/foo.js.gif
(same if I use example.js instead of foo.js or if I specify the GIF file name explicitly)
It might be a problem with bashisms. If you use another shell and you want to polish the script, feel free to go ahead.
(It is a really old project, and the code looks quite lame to me now...)
AP
On 04/02/2017 10:41 AM, tjt263 wrote:
Ah, I just noticed that you mentioned it in the readme file. After reading about that; I thought that would fix it, but same thing. The problem with that example that you gave, is that it's performing the operation on |./demo.json| regardless of the input specified.
For instance:
|cd ./asciicast2gif/ #current working directory cp ../example.json ./
copy to current directory rm demo.json #remove(for demonstration)
./asciicast2gif example.json example.gif #specify JSON in & GIF out [INFO] Starting Python 2 SimpleHTTPServer on port 8000 [INFO] Temporary directory is /tmp/asciicast2gif.8HfD2UnI [ERRO] Error transferring http://localhost:8000/*demo.json* -server replied: File not found [INFO] error fetching asciicast file: [INFO] ({:status 404, :status-text "File not found", :failure :error, :response "
\nError response \n\n\nError response
Error code 404.\n
Message: File not found.\n
Error code explanation: 404 = Nothing matches the given URI.\n\n"}) |
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pettarin/asciicast2gif/issues/2#issuecomment-290973030, or mute the thread https://github.com/notifications/unsubscribe-auth/AD5Zk1m5z-A4-JDTEMAN2nw_VnuCG7MGks5rr18lgaJpZM4MwhcO.
It's not perfect, but it's not too bad. I have fixed up a bunch of things. Going to send a pull request, but not sure why this isn't working for me. Must be a problem with the packages on my system. Thanks for taking the time.
Closing, as I just pushed a new version, with bashisms (hopefully) removed.
Hi, i tried:
~/asciicast2gif/asciicast2gif ~/example.json ~/example.gif
. It just seems to, either:~/asciicast2gif/gifs/demo.gif
to~/example.gif
; or~/asciicast2gif/gifs/demo.json
, instead of~/example.json
. (or~/asciicast2gif/demo.json
).Not sure what i did wrong here.