initial commits

master
Charles Iliya Krempeaux 2023-12-14 13:38:22 -08:00
commit 31a9590adb
2 changed files with 72 additions and 0 deletions

19
LICENSE 100644
View File

@ -0,0 +1,19 @@
Copyright (c) 2023 Charles Iliya Krempeaux :: http://changelog.ca/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

53
README.md 100644
View File

@ -0,0 +1,53 @@
# tweet-style
**tweet-style** is an XSL / XSLT stylesheet for Twitter tweets stored in an XML format like this:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<tweet>
<created_at>2008-03-18T00:31:15.000Z</created_at>
<id>12345</id>
<lang>en</lang>
<text>Hello world!</text>
<author>
<created_at>2007-02-15T05:32:42.000Z</created_at>
<id>141516</id>
<name>Joe Blow</name>
<username>superjow</username>
</author>
</tweet>
```
You use tweet-style to turn XML that has that structure into XHTML that can be viewed in the web-browser.
## Import
To import and use **tweet-style** in your XML files, add code similar to this to your XML files:
```xml
<?xml-stylesheet type="text/xsl" href="/modules/tweet-style/tweet.xsl"?>
```
**NOTE THAT THE PATH (i.e., what is in the "href" attribute) THAT YOU USE WILL LIKELY BE DIFFERENT.**
Set the value of the "`href`" to wherever you installed it.
For example, if you installed **tweet-style** at "`../../style/tweet-style/`", then the XML code you add would probably be:
```xml
<?xml-stylesheet type="text/xsl" href="../../style/tweet-style/tweet.xsl"?>
```
## Installation
To install **tweet-style** you can either just put the `tweet.xsl` somewhere on your web-server.
Maybe at: "/style/tweet-style/tweet.xsl", or somewhere else.
Alternatively you can use a git submodule.
For example:
```
git submodule add https://sourcecode.social/reiver/tweet-style tweet-style
```
## Author
**tweet-style** was written by [Charles Iliya Krempeaux](http://changelog.ca)