Tweet Cruncher

I have a Social Media project on the go (waves at https://twitter.com/librarytrustees) that is going to involve tweeting sections of existing documents.

I really hate counting characters. So I decided it was time to make myself a tool for the job.

Original Document and Result after Tweet Cruncher is run on the selected text
Original Document and Result after Tweet Cruncher is run on the selected text

You can see above what I have; the selected area of the original document is highlighted in varying colours, corresponding to the resulting text broken up into tweets. Additionally, I have inserted my chosen hashtag and a count of the sequence of tweets.

Dialog box for Tweet Cruncher
Tweet Cruncher Dialog

The length of the tweets and the Hashtag are entered in a dialog box when the Tweet Cruncher runs. This information is saved with the document, for consistency with subsequent tweets. The Tweets are not exactly the tweet length; I’ve added a bit of code to “round off” each tweet to whole words. The hashtag and sequence count are additional to the length.

And realistically, there will still be editing for content and meaning. Nevertheless, this tool should save me a ton of counting and get the project going faster.

Sub BreakIntoTweets()
Dim IntSelection As Integer
Dim IntPostNumb As Integer
Dim IntPostCount As Integer
Dim IntCharCount As Integer
Dim IntTweetLength As Integer
Dim rngSelectedRange As Word.Range
Dim strPostText As String
Dim intColourPick As Integer
Dim docNewDoc As Word.Document
Dim docWorkingDoc As Word.Document
Dim strPropertyName As String
Dim strHashTag As String
Dim blnWord As Boolean
Dim intActualLength As Integer

Dim arrColourOptions As Variant
arrColourOptions = Array(wdBrightGreen, wdPink, wdTurquoise, wdYellow)
   
Set docWorkingDoc = ActiveDocument
strPropertyName = "HashTag"
strHashTag = frmStartCrunchingTweets.txtHashTag
docWorkingDoc.CustomDocumentProperties(strPropertyName) = strHashTag
IntTweetLength = frmStartCrunchingTweets.txtTweetLength
Set rngSelectedRange = Selection.Range
MsgBox rngSelectedRange.Characters.Count & " characters are selected. Including Paragraph Marks"
IntSelection = rngSelectedRange.Characters.Count
IntPostNumb = IntSelection / IntTweetLength
MsgBox IntPostNumb

rngSelectedRange.Characters(1).Select
IntCharCount = 1
Documents.Add DocumentType:=wdNewBlankDocument
Set docNewDoc = ActiveDocument
docWorkingDoc.Activate
For IntPostCount = 1 To IntPostNumb
    Selection.MoveRight unit:=wdCharacter, Count:=IntTweetLength - 1, Extend:=wdExtend
    If (Right(Selection.Text, 1) <> " ") Then blnWord = True ' extend to word
    If (Right(Selection.Text, 1) <> ".") Then blnWord = True
    If (Right(Selection.Text, 1) <> "?") Then blnWord = True
    If (Right(Selection.Text, 1) <> vbCr) Then blnWord = True
    If (Right(Selection.Text, 1) <> "!") Then blnWord = True
    If blnWord = True Then
        Selection.MoveRight unit:=wdWord, Count:=1, Extend:=wdExtend
        intActualLength = Selection.Characters.Count
    Else
        intActualLength = IntTweetLength
    End If
    blnWord = False
    strPostText = Selection.Text & frmStartCrunchingTweets.txtHashTag & " " & IntPostCount & "/" & IntPostNumb
    'get rid of any hard returns
    strPostText = Replace(strPostText, vbCr, " ")
    docNewDoc.Activate
    Selection.TypeText (strPostText) & vbCr
    docWorkingDoc.Activate
    intColourPick = IntPostCount - (4 * Int(IntPostCount \ 4)) 'note this is why no base 1 option for array here, also \ means different than / (truncation function)
    Selection.Range.HighlightColorIndex = arrColourOptions(intColourPick)
    IntCharCount = IntCharCount + intActualLength
      On Error Resume Next
    rngSelectedRange.Characters(IntCharCount).Select '(errors on final character of selection)
Next IntPostCount

End Sub

iOS 10, Accessibility and Vision Options

If you are using an iPhone or iPad and your vision is compromised (or, ahem if you are over 50), you might find these options useful. With every version of iOS the accessibility options have improved and expanded.

The following is the sequence of steps I follow when setting up an iOS device for someone with vision issues; as always your mileage may vary, but even if you only catch yourself squinting at your phone from time to time – give these options a try.

Change your Wallpaper to Black

It is cool to have nifty images on your phone screen, but if you are having trouble reading the labels for your folders, then it may be time to use a black background. You may also want to do this for your lock screen so that notifications and buttons stand out more.

The easiest method is to take a black photograph and use it as your background. Set your device on a table, block the light and take a photo (you may need to turn off your flash first). Use this photo for your background by going to Settings>Wallpaper > Choose a New Wallpaper and selecting your new photo from the Camera Roll.

Setting or Cancelling the change of Wallpaper
Setting or Cancelling the change of Wallpaper

Choose the Set option and then select the Set Home Screen option

Setting the Picture to display on the Lock or Home Screen
Setting the Picture to display on the Lock or Home Screen

Improve Your View

Next go to Settings > General > Accessibility and select the following options:

  • Larger Text, you can start by using the slider to set your preferred text size or you make things even BIGGER by turning on Larger Accessibility Sizes and using the slider again. This comes with a couple of caveats. 1) Text is not affected everywhere on the device – tho Apple is clearly working to change this, and third party apps are (slowly) coming around. 2) Sometimes, you can have too much of a good thing and have text that throws off the formatting or wraps weirdly or overlaps illegibly. Again, these problems are gradually being worked on as apps are updated.

    Setting the Larger Text size
    Setting the Larger Text size
  • Bold Text – turning this option on will require a reboot of your device, because EVERYTHING has to be redrawn.  But this will make the typeface used far more readable.
  • Button Shapes – turning on button shapes will make them easier to find. Now, if they were only used more consistently throughout the OS, that would be awesome.
  • Increase Contrast and turn on Reduce Transparency and Darken Colors.  This should also help text stand out more.

    Increase Contrast options
    Increase Contrast options
  • On/Off Labels add the | 0 symbols to your toggles, and I say why not!
Accessibility Options
Accessibility Options

Use your Home button to Zoom IN

While you are still in Settings > General > Accessibility , move down to Accessibility Shortcut. Here you can customize the action of the Home button when your triple-click it.  Choose Zoom

Turning on Triple-Click to Zoom
Turning on Triple-Click to Zoom

You’ll need to fine-tune Zoom’s behaviour, by going to Settings > General > Accessibility  > Zoom

Zoom Options pt 1
Zoom Options pt 1

Don’t worry about turning Zoom on here, that is what your triple-click will do. Instead:

  • Turn on Follow Focus and Smart Typing.
  • You may choose to Show Controller, but I find there is a balance between clutter and helpfulness, for me this clutters the screen too much.

    Zoom Options Part 2
    Zoom Options Part 2
  • Select Zoom Region and choose Window Zoom.
  • Play with the Maximum Zoom Level slider, you’ll probably adjust this more later.

To turn the zoom window on triple-click your home button and the zoom window will appear, outlined in black with a small tab handle at the bottom.

The Zoom Window in action
The Zoom Window in action

This is a toggle, so a second triple click turns the zoom window off.  And what is really great, is that you can interact with the screen through the window.  Click on links and type in dialog boxes whatever you need to do. This window is not just for viewing!

Customize the Zoom Window

By touching the tab handle shape at the bottom of the zoom window, a customization menu opens up.

Changing the Zoom Window options
Changing the Zoom Window options

Through it you can:

  • Zoom Out (turn off window)
  • Change to Full Screen Zoom
  • Resize Lens,
    Resizing the Zoom Window
    Resizing the Zoom Window

    which will allow you to resize the Zoom Window with the handles provided.

  • Choose Filter, which will set a colour filter on the Zoom Window
  • Show Controller
  • Change Magnification using the slider, which uses the setting from the Maximum Zoom Level, you set earlier.

Add a Magnifier to the Home Button

The new magnifier option isn’t for your screen, but rather for all the small print articles you need to read. From menus in dark restaurants to the label on a pill bottle, if you have your phone you can read it. Go to Settings > General > Accessibility  > Magnifier

turning on the magnifier
turning on the magnifier

Turn on the Magnifier and Auto-Brightness.

Now when you triple-click your Home button, an Accessibility Shortcuts menu will pop up. Tap the action you want to perform.

Choosing the Accessibility Shortcut
Choosing the Accessibility Shortcut

 

Update: A New Free to use Photo Site

I just came across a new free photo site called https://unsplash.com/  if you are creating visuals for your library’s social media feed, they have great pictures of books and people reading. Perfect for combining pictures and quotes. I was inspired by the picture below:

Books Stacked Everywhere - from unsplash.com
Books Everywhere

So I headed off to the internet to find a quote that I thought was perfect for these random stacks of books.

“The old man was peering intently at the shelves. 'I'll have to admit that he's a very competent scholar.' Isn't he just a librarian?' Garion asked, 'somebody who looks after books?' That's where all the rest of scholarship starts, Garion. All the books in the world won't help you if they're just piled up in a heap.” ― David Eddings, King of the Murgos
Organization – the secret power of Librarians!

Using the tip I mentioned in this post, I combined the text and image into a picture sized for Twitter.

And then because I’d fallen down into the internet quote-hole I used another picture from unsplash and a terrific quote from the always library friendly Neil Gaiman.

“It's still National Library Week. You should be especially nice to a librarian today, or tomorrow. Sometime this week, anyway. Probably the librarians would like tea. Or chocolates. Or a reliable source of funding.” ― Neil Gaiman
We love Neil Gaiman

If you want to look back – I have a previous post on other free graphics sites.

Fixing an annoyance in Outlook 2010

The scenario:

You like to flag your mail for Follow Up on a specific day. But Outlook always defaults to setting the reminder at the end of the day. Can this be changed to the beginning of the day?

It makes sense that if you want a reminder set for Today, that the default time for that flag is set to one hour before the end of your work day (as defined in your Calendar settings).

It makes sense that flagging a reminder for one of the pre-defined future dates (Tomorrow, This Week or Next Week) uses the start of your work day as the default time.

It makes NO SENSE that flagging a Custom date reminder reverts the default time to one hour before the end of the work day.

To change this default to the start of your work day.

Finding the Quick Click menu
Finding the Quick Click menu

Click on the drop-down arrow on the Follow Up button on the Home Ribbon.

Select Quick Click

The Quick Click dialog box
The Quick Click dialog

The Set Quick Click dialog appears. Choose Tomorrow as the default. Click the OK button.

Done. Future custom reminder times will now default to the start of the work day – not the end.