A terminal-only Bluesky / AT Protocol client written in Fortran, with a asm/Rust native firehose decoder for the relay-raw stream. DM slide support. Dither image composer. Yes, that Fortran www.patreon.com/FormerLab
rust atproto fun fortran assembly
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix line truncation errors on gfortran 13 -Werror=line-truncation

FormerLab c869ee92 ed9d2a6c

+14 -7
+4 -2
src/atproto/client.f90
··· 83 83 state%refresh_jwt = '' 84 84 state%did = '' 85 85 state%access_jwt(1:min(len_trim(access), len(state%access_jwt))) = access(1:min(len_trim(access), len(state%access_jwt))) 86 - state%refresh_jwt(1:min(len_trim(refresh), len(state%refresh_jwt))) = refresh(1:min(len_trim(refresh), len(state%refresh_jwt))) 86 + state%refresh_jwt(1:min(len_trim(refresh), len(state%refresh_jwt))) = & 87 + refresh(1:min(len_trim(refresh), len(state%refresh_jwt))) 87 88 state%did(1:min(len_trim(did), len(state%did))) = did(1:min(len_trim(did), len(state%did))) 88 89 ! Resolve real PDS host from plc.directory 89 90 block ··· 304 305 call create_post_record(state, text, '', '', '', '', embed_uri, embed_cid, ok, message, created_uri) 305 306 end subroutine create_record_with_embed 306 307 307 - subroutine create_post_record(state, text, parent_uri, parent_cid, root_uri, root_cid, embed_uri, embed_cid, ok, message, created_uri) 308 + subroutine create_post_record(state, text, parent_uri, parent_cid, & 309 + root_uri, root_cid, embed_uri, embed_cid, ok, message, created_uri) 308 310 type(session_state), intent(in) :: state 309 311 character(len=*), intent(in) :: text, parent_uri, parent_cid, root_uri, root_cid, embed_uri, embed_cid 310 312 logical, intent(out) :: ok
+2 -1
src/atproto/decode.f90
··· 1 1 module decode_mod 2 - use models_mod, only: post_view, stream_event, actor_profile, notification_view, MAX_ITEMS, FIELD_LEN, HANDLE_LEN, URI_LEN, CID_LEN, TS_LEN 2 + use models_mod, only: post_view, stream_event, actor_profile, notification_view, & 3 + MAX_ITEMS, FIELD_LEN, HANDLE_LEN, URI_LEN, CID_LEN, TS_LEN 3 4 use json_extract_mod, only: extract_json_string, extract_json_object_after, extract_json_array_after, & 4 5 next_array_object, extract_reply_refs, slice_fit, find_first_array, & 5 6 extract_json_string_any
+2 -1
src/atproto/http_cbridge.f90
··· 18 18 type(c_ptr) :: res 19 19 end function fortransky_http_get 20 20 21 - function fortransky_http_post_json(url, auth_header, json_body, status_code, out_len) bind(C, name='fortransky_http_post_json') result(res) 21 + function fortransky_http_post_json(url, auth_header, json_body, & 22 + status_code, out_len) bind(C, name='fortransky_http_post_json') result(res) 22 23 import :: c_ptr, c_char, c_long, c_size_t 23 24 character(kind=c_char), dimension(*), intent(in) :: url 24 25 character(kind=c_char), dimension(*), intent(in) :: auth_header
+2 -1
src/atproto/json_extract.f90
··· 1 1 module json_extract_mod 2 2 use strings_mod, only: json_unescape, squeeze_spaces, replace_all 3 - use models_mod, only: post_view, stream_event, actor_profile, notification_view, MAX_ITEMS, FIELD_LEN, HANDLE_LEN, URI_LEN, CID_LEN, TS_LEN 3 + use models_mod, only: post_view, stream_event, actor_profile, notification_view, & 4 + MAX_ITEMS, FIELD_LEN, HANDLE_LEN, URI_LEN, CID_LEN, TS_LEN 4 5 implicit none 5 6 private 6 7 public :: extract_json_string, extract_json_object_after, extract_json_array_after
+4 -2
src/ui/tui.f90
··· 588 588 root_uri = trim(target%uri) 589 589 root_cid = trim(target%cid) 590 590 end if 591 - call create_reply(state%session, trim(text), trim(target%uri), trim(target%cid), trim(root_uri), trim(root_cid), ok, message, created_uri) 591 + call create_reply(state%session, trim(text), trim(target%uri), trim(target%cid), & 592 + trim(root_uri), trim(root_cid), ok, message, created_uri) 592 593 if (ok) then 593 594 call set_status(state, 'Reply created: ' // trim(created_uri)) 594 595 else ··· 636 637 root_uri = trim(target%uri) 637 638 root_cid = trim(target%cid) 638 639 end if 639 - call create_reply(state%session, trim(text), trim(target%uri), trim(target%cid), trim(root_uri), trim(root_cid), ok, message, created_uri) 640 + call create_reply(state%session, trim(text), trim(target%uri), trim(target%cid), & 641 + trim(root_uri), trim(root_cid), ok, message, created_uri) 640 642 if (ok) then 641 643 call set_status(state, 'Reply created: ' // trim(created_uri)) 642 644 else