Closed madprops closed 4 years ago
I can't reproduce your issue. I have a text file with italics: italic.txt Looks like this: And produces this output with aha:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- This file was created with the aha Ansi HTML Adapter. https://github.com/theZiz/aha -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="application/xml+xhtml; charset=UTF-8" />
<title>stdin</title>
</head>
<body>
<pre>
<span style="font-style:italic;">foo</span>bar
</pre>
</body>
</html>
Can you give me an example where this is not working for you?
For instance check this generated html: https://madprops.github.io/sym/
As you can see the original output has some italics:
I use a script to generate this:
Just checked and the 'script' output does contain the italics, even after sed. So it's likely some parse problem at the 'aha' level.
Can you give my the script or the output of the script for having a deeper look?
Here's the output of script -c 'sym' -q example.script
Script started on 2020-01-02 14:52:45-0600
[1m[32mSymlink creator and manager[0m
[1m[34mExamples:[0m
Add an item:
[36msym add movies ~/media/movies art videos[0m
[3mThis creates an item called movies.[0m
[3mAssociated with the provided path.[0m
[3mAnd 2 tags were added to it.[0m
[3mThis will create a symlink: ~/sym/movies[0m
[3mIt will also create tag symlinks:[0m
[3m~/sym/tags/art/movies[0m
[3mand ~/sym/tags/videos/movies[0m
[3mThese 3 symlinks point to the same path.[0m
[3mYou can do for instance 'ls ~/sym/movies'[0m
[3mAnd it will show the contents of ~/media/movies[0m
Remove an item:
[36msym remove movies[0m
[3mor regex...[0m
[36msym remove re:\\w+[0m
Remove an item by path:
[36msym removepath /media/movies[0m
[3mor regex...[0m
[36msym removepath re:\\w+[0m
Rename an item:
[36msym rename movies moviez[0m
Add tags:
[36msym addtags movies art modern[0m
Remove tags:
[36msym removetags movies art modern[0m
Replace tags:
[36msym replacetags movies art modern[0m
List items:
[36msym list[0m
List tags:
[36msym tags[0m
List paths associated with a tag:
[36msym tag funny[0m
Change the path of an item:
[36msym changepath movies /media/movies[0m
Show the path of an item:
[36msym path movies[0m
Open a path in the file manager:
[36msym open movies[0m
Remake symlinks based on the database:
[36msym remake[0m
Make a backup:
[36msym backup[0m
Restore from backup:
[36msym restore[0m
Print a string of item names:
[36msym printnames[0m
Scripts:
[3mScripts can be used for automation.[0m
[3mScripts are 1 command per line.[0m
[36m[0m
[3mExample script:[0m
[36mmovies ~/media/movies plot[0m
[36mtag movies woomy[0m
[36mbackup[0m
Run a script:
[36msym runscript /path/to/script[0m
Make a script:
[36msym makescript /path/to/save[0m
[1m[34mFlags:[0m
--dev
[36mUsed for development[0m
--force
[36mRun commands without confirmation[0m
Script done on 2020-01-02 14:52:45-0600
I tried to reproduce your problem, even learned what sed '1d;$d'
does, but for me it just works. Even in your pasted snipped I clearly see \033[3m
which should produce italic output. Which version are you using?
I think I was using an old version, and it got updated with the Ubuntu upgrade (I'm now running 0.5), because now I ran the same command and it outputs italics just fine. So it works! thank you
Italic ansi codes don't seem to be applied into the html render.