Searching We.Love.Privacy.Club

Twts matching #8:
Sort by: Newest, Oldest, Most Relevant

@movq@www.uninformativ.de What do you think about this?

diff –git a/jenny b/jenny
index b47c78e..20cf659 100755
— a/jenny
+++ b/jenny
@@ -278,7 +278,8 @@ def prefill_for(email, reply_to_this, self_mentions):
def process_feed(config, nick, url, content, lasttwt):

 nick_address, nick_desc = decide_nick(content, nick)
 url_for_hash = decide_url_for_hash(content, url)
  • new_lasttwt = parse(‘1800-01-01T12:00:00+00:00’).timestamp()

  • # new_lasttwt = parse(‘1800-01-01T12:00:00+00:00’).timestamp()

  • new_lasttwt = None

    for line in twt_lines_from_content(content):

     res = twt_line_to_mail(
    

    @@ -296,7 +297,7 @@ def process_feed(config, nick, url, content, lasttwt):

     twt_stamp = twt_date.timestamp()
     if lasttwt is not None and lasttwt >= twt_stamp:
         continue
    
  • if twt_stamp > new_lasttwt:

  • if not new_lasttwt or twt_stamp > new_lasttwt:

         new_lasttwt = twt_stamp
    
    
     mailname_new = join(config['maildir_target'], 'new', twt_hash)
    

⤋ Read More

@movq@www.uninformativ.de
I’m not a Python programmer, so please bear with me.
The doc about encodings does also mention:

If you require a different encoding, you can manually set the Response.encoding property

Wouldn’t that be a one liner like (Ruby example)?

'some text'.force_encoding('utf-8')

I understand that you do not want to interfere with requests. On the other hand we know that received data must be utf-8 (by twtxt spec) and it does burden “publishers” to somehow add charset property to content-type header. But again I’m not sure what “the right thing to do” ™ is.

⤋ Read More

@prologic@twtxt.net @movq@www.uninformativ.de
Exactly, you see correct UTF-8 encoded version (even with content-type: text/plain leaving out charset declaration).

After following utf8test twtxt myself I now see that jenny does not handle it as UTF-8 when charset is missing from HTTP header, just like @quark@ferengi.one has observed.

So should jenny treat twtxt files always as UTF-8 encoded? I’m not sure about this.

⤋ Read More
In-reply-to » What about a meta header for setting charset?

@prologic@twtxt.net

I believe Yarn assumes utf-8 anyway which is why we don’t see encoding issues

Are you sure? I think in #kj2c5oa @quark@ferengi.one mentioned exactly that problem. My logs say “jenny/latest” was fetching my twtxt for quark.

All I did to fix this was to adding AddCharset utf-8 .txt to .htaccess. Especially I did not change encoding of stackeffect.txt.

⤋ Read More

What about a meta header for setting charset?

I myself stumbled upon .txt files not being delivered with charset: utf-8 by default.

I had to set/modify .htaccess to correct that.

It would have been easier if there had been a charset header entry “overwriting” what http server is delivering.

What do you think?

⤋ Read More

** Data Types and Variables in C **
I’ve been writing a heap of Lua lately — this has lead to my becoming interested, again, in C. Here are some ancient notes I dug up on the most basics of data types and variables in C.

All of a computer’s memory is comprised of bits. A sequence of 8 bits forms a byte. A group of bytes (typically 4 or 8) form a word. Each word is associated with a memory address. The address increases by 1 with each byte of memory.

In C, a byte is an object that is as big as t … ⌘ Read more

⤋ Read More

An estimated 6.8 million fewer female births will be recorded across India by 2030 because of the persistent use of selective abortions, researchers estimate. — The Guardian

And from the same article:

India’s skewed ratio of men to women – currently between 900-930 females per 1,000 males – reflects India’s ingrained attitude towards girls. Boys are seen as breadwinners while girls are seen as a burden across every social class. Boys are more likely to receive more nutritious food and better medical care than girls.

That is just beyond sad.

⤋ Read More

@movq@www.uninformativ.de I am getting this when I run it on cron (extra lines in between becuase otherwise jenny will make them a mash):

Traceback (most recent call last):

File “/home/quark/jenny/jenny”, line 565, in

if not retrieve_all(config):

File “/home/quark/jenny/jenny”, line 373, in retrieve_all

refresh_self(config)

File “/home/quark/jenny/jenny”, line 294, in refresh_self

process_feed(config, config[‘self_nick’], config[‘self_url’], content)

File “/home/quark/jenny/jenny”, line 280, in process_feed

fp.write(mail_body)

File “/usr/lib/python3.8/encodings/iso8859_15.py”, line 19, in encode

return codecs.charmap_encode(input,self.errors,encoding_table)[0]

UnicodeEncodeError: ‘charmap’ codec can’t encode character ‘\U0001f4e3’ in position 31: character maps to

⤋ Read More

I want to somehow use my monome grid to build out coarse vocal tract shapes for a physical model like !voc or @!(sndkitref “tract”)!@. 16 diameters with 8 steps of resolution, or 32 diameters with 4 steps of resolution. #halfbakedideas

⤋ Read More

Are you able to coax your webserver to add the charset to the content type header? Browsers are having a hard time thinking you are sending latin-1

content-type: text/plain; charset=utf-8

⤋ Read More