gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-anastasis] branch master updated: -almost working posting


From: gnunet
Subject: [taler-anastasis] branch master updated: -almost working posting
Date: Wed, 28 Dec 2022 01:14:52 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 780e28a  -almost working posting
780e28a is described below

commit 780e28adf6acc89b3e28a009f5e275765448c872
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Wed Dec 28 01:14:49 2022 +0100

    -almost working posting
---
 src/authorization/anastasis-authorization-post.sh | 38 +++++++++++------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/authorization/anastasis-authorization-post.sh 
b/src/authorization/anastasis-authorization-post.sh
index 3971309..f74f382 100755
--- a/src/authorization/anastasis-authorization-post.sh
+++ b/src/authorization/anastasis-authorization-post.sh
@@ -49,12 +49,21 @@ cat - | sed -e "s/%NAME%/$NAME/g" \
            -e "s/%COUNTRY%/$COUNTRY/g" \
            -e "s/%MESSAGE%/$MESSAGE/g" > input.tex <<EOF
 \NeedsTeXFormat{LaTeX2e}
-\documentclass[10pt]{letter}
+\documentclass[fontsize=11pt,a4paper,DE]{scrlttr2}
+\makeatletter
+\KOMAoptions{foldmarks=off}
+%\@setplength{toaddrvpos}{30mm}
+%\@setplength{toaddrhpos}{130mm}
+%\@setplength{sigbeforevskip}{10mm}
+\makeatother
+\setkomavar{subject}{Anastasis Recovery}
+%\setkomavar{fromname}{Anastasis SARL}
+\setkomavar{signature}{Anastasis SARL}
 \date{\today}
-\address{Anastasis SARL \\\\ 7 rue de Mondorf \\\\ 5431 Erpeldange}
-\signature{Anastasis SARL}
+%\address{Anastasis SARL \\\\ 7 rue de Mondorf \\\\ 5431 Erpeldange}
+%\signature{Anastasis SARL}
 \begin{document}
-\begin{letter}{%NAME% \\\\ %STREET% \\\\ %POSTCODE% %CITY% \\\\ %COUNTRY% }
+\begin{letter}{\ \ %NAME% \\\\ \ \ %STREET% \\\\ \ \ %POSTCODE% %CITY% \\\\ \ 
\ %COUNTRY% }
 \opening{To whom it may concern,}
 %MESSAGE%
 \closing{Best regards}
@@ -98,7 +107,6 @@ RECIPIENT="$(jq -n '
     --arg POSTCODE "$POSTCODE" \
     --arg COUNTRY "$COUNTRY" \
   )"
-echo RECIPIENT $RECIPIENT
 
 SENDER="$(jq -n '
     {
@@ -111,8 +119,6 @@ SENDER="$(jq -n '
     }' 
   )"
 
-echo SENDER $SENDER
-
 REQUEST="$(jq -n '
     {   data: {
         type: "letters",
@@ -120,22 +126,18 @@ REQUEST="$(jq -n '
          file_original_name: "input.pdf",
          file_url: $UPLOAD_URL,
          file_url_signature: $URL_SIG,
-         address_position: "right",
+         address_position: "left",
          delivery_product: "cheap",
          print_mode: "duplex",
          auto_send: false,
-         print_spectrum: "grayscale",
-         meta_data: {
-            recipient: $RECIPIENT,
-             sender: $SENDER
-          } } }
+         print_spectrum: "grayscale"
+        } }
     }' \
     --argjson RECIPIENT "$RECIPIENT" \
     --argjson SENDER "$SENDER" \
     --arg UPLOAD_URL "$UPLOAD_URL" \
     --arg URL_SIG "$URL_SIG" \
   )"
-echo REQUEST $REQUEST
 
 STATUS=$(curl --request POST \
      --url $ENDPOINT/organisations/${ORG_ID}/letters \
@@ -144,7 +146,6 @@ STATUS=$(curl --request POST \
      -d "$REQUEST" \
      -o $MYDIR/final-reply.txt \
      -w "%{http_code}" -s)
-echo STATUS $STATUS
 cat $MYDIR/final-reply.txt >> $LOGS
 case $STATUS in
     201)
@@ -157,16 +158,15 @@ case $STATUS in
 esac
 LETTER_ID=`echo $REPLY | jq -r .data.id`
 
-exit 0
-
 REPLY=`mktemp /tmp/authorization-delete-replyXXXXXX`
-STATUS=$(curl --request POST \
+STATUS=$(curl --request DELETE \
         --url $ENDPOINT/organisations/$ORG_ID/letters/$LETTER_ID \
+        --header "Authorization: Bearer $ACCESS_TOKEN" \
         -o $REPLY \
         -w "%{http_code}" -s)
 cat $REPLY >> $LOGS
 case $STATUS in
-    200)
+    204)
         ;;
     *)
         echo "Failed to delete letter: $STATUS" >> $LOGS

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]